#include<iostream>
#include<unistd.h>
#include"BlockQueue.hpp"
BlockQueue<int> q;


void* Consume(void*args)
{
    while(1)
    {
        q.pop();
        sleep(2);
    }

}

void* Product(void*args)
{
    int date=10;

    while(1)
    {
        q.push(date);
        //sleep(1);
    }




}

int main()
{
    pthread_t productor;
    pthread_t consumer;
    pthread_create(&productor,nullptr,Product,nullptr);
    pthread_create(&consumer,nullptr,Consume,nullptr);

    pthread_join(productor,nullptr);
    pthread_join(consumer,nullptr);
}